# src/timeseries/data_feed/CMakeLists.txt
cmake_minimum_required(VERSION 3.20) # 需要 CMake 3.14 或更高版本
project(test_xylog)

# 定义项目公共头文件目录
set(LOCAL_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)

add_executable(test_xylog  xy_logger.cpp log.cpp)

# 设置包含目录（使用接口包含保证使用者可见）
target_include_directories(test_xylog
    PUBLIC
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目include
    $<BUILD_INTERFACE:${PROJECT_INCLUDE_DIR}>               # 项目公共头文件
    $<INSTALL_INTERFACE:include>                            # 安装后路径

)

target_link_directories( test_xylog PUBLIC ${PROJECT_LIB_DIR} )
# 添加编译选项，确保在编译和链接时使用正确的宏定义
target_compile_definitions(test_xylog PRIVATE
QUILL_DISABLE_NON_PREFIXED_MACROS
QUILL_FMT_EXTERNAL=ON
)

target_link_libraries(test_xylog  quill fmt )

